package com.ruicar.afs.cloud.product.processor;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumUtil;
import com.ruicar.afs.cloud.common.core.query.QueryCondition;
import com.ruicar.afs.cloud.common.core.security.vo.UserVo;
import com.ruicar.afs.cloud.common.core.util.SpringContextHolder;
import com.ruicar.afs.cloud.product.enums.WorkflowTypeEnum;
import com.ruicar.afs.cloud.workflow.api.dto.afsprocess.request.CommonGetRequest;
import com.ruicar.afs.cloud.workflow.api.dto.afsprocess.request.GetAssignUserRequest;
import com.ruicar.afs.cloud.workflow.api.dto.afsprocess.request.UserOnlineRequest;
import com.ruicar.afs.cloud.workflow.api.dto.afsprocess.response.*;
import com.ruicar.afs.cloud.workflow.gwt.processor.AfsWorkFLowQueryProcessor;
import com.ruicar.afs.cloud.workflow.gwt.processor.DefaultAfsWorkFLowQueryProcessor;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * @author limingzhi
 */
public class ChannelOnlineQueryProcessor implements AfsWorkFLowQueryProcessor {

    @Override
    public List<String> afsFLowKeys() {
        return Arrays.asList(new String[]{
                //渠道上线：新车，二手车
                AfsEnumUtil.key(WorkflowTypeEnum.PRODUCT_LAUNCH)
                , AfsEnumUtil.key(WorkflowTypeEnum.PRODUCT_MODIFY)
        });
    }

    @Override
    public List<UserOnlineResponse> checkUserOnline(UserOnlineRequest userOnlineRequest) {
        return null;
    }

    ///
    @Override
    public GetAssignUserResponse getAssignUser(GetAssignUserRequest getAssignUserRequest) {
        return null;
    }

    @Override
    public QueryOrgConditionResponse queryOrgCondition(CommonGetRequest commonGetRequest) {
        return null;
    }

    @Override
    public QueryRoleResponse queryRole(CommonGetRequest commonGetRequest) {
        return null;
    }

    @Override
    public Page<QueryUserResponse> queryUserInfo(QueryCondition<Map<String, Object>> queryCondition) {
        return null;
    }

    ///
    @Override
    public UserVo getRtnUserInfo(CommonGetRequest commonGetRequest) {
        //退回
        return SpringContextHolder.getBean(DefaultAfsWorkFLowQueryProcessor.class).getRtnUserInfo(commonGetRequest);
    }


    @Override
    public UserVo getApplyUserInfo(CommonGetRequest commonGetRequest) {
        return SpringContextHolder.getBean(DefaultAfsWorkFLowQueryProcessor.class).getApplyUserInfo(commonGetRequest);
    }

    @Override
    public UserVo getLeader(CommonGetRequest commonGetRequest) {
        //退回经销商
        return null;
    }

    ///
    @Override
    public UserVo getOperUser(CommonGetRequest commonGetRequest) {
        //指定处理人
        return null;
    }
}
